<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>Sa-Token</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="description" content="Sa-Token是一个java权限认证框架，功能全面，上手简单，登录认证、权限认证、Session会话、踢人下线、账号封禁、集成Redis、前后台分离、分布式会话、微服务网关鉴权、单点登录、OAuth2.0、临时Token验证、记住我模式、模拟他人账号、临时身份切换、多账号体系、注解式鉴权、路由拦截式鉴权、花式token、自动续签、同端互斥登录、会话治理、密码加密、jwt集成、Spring集成、WebFlux集成...，有了sa-token，你所有的权限认证问题，都不再是问题">
		<meta name="keywords" content="sa-token,sa-token框架,sa-token文档,java权限认证">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<link rel="shortcut icon" type="image/x-icon" href="logo.png">
		<link rel="stylesheet" href="./static/doc.css">
		<link rel="stylesheet" href="./static/vue.css">
	</head>
	<body>
		<div class="doc-header">
			<div class="nav-left">
				<a href="doc.html">
					<div class="logo-box">
						<img src="logo.png" title="logo" />
						<h1 class="logo-text">Sa-Token</h1>
						<sub>v1.34.0</sub>
					</div>
				</a>
			</div>
			<nav class="nav-right">
				<div class="sear-box p-none" tabindex="-1" >
					<!-- 加载中…… -->
				</div>
				<select class="select-version p-none" onchange="location.href=this.value">
					<option value="doc.html">最新版</option>
					<option value="v/v1.33.0/doc.html">v1.33.0</option>
					<option value="v/v1.32.0/doc.html">v1.32.0</option>
					<option value="v/v1.31.0/doc.html">v1.31.0</option>
					<option value="v/v1.30.0/doc/index.html">v1.30.0</option>
					<option value="v/v1.29.0/doc/index.html">v1.29.0</option>
					<option value="v/v1.28.0/doc/index.html">v1.28.0</option>
					<option value="v/v1.27.0/doc/index.html">v1.27.0</option>
					<option value="v/v1.26.0/doc/index.html">v1.26.0</option>
					<option value="v/v1.25.0/doc/index.html">v1.25.0</option>
					<option value="v/v1.24.0/doc/index.html">v1.24.0</option>
					<option value="v/v1.23.0/doc/index.html">v1.23.0</option>
					<option value="v/v1.22.0/doc/index.html">v1.22.0</option>
					<option value="v/v1.21.0/doc/index.html">v1.21.0</option>
					<option value="v/v1.20.0/doc/index.html">v1.20.0</option>
					<option value="v/v1.19.0/doc/index.html">v1.19.0</option>
					<option value="v/v1.18.0/doc/index.html">v1.18.0</option>
					<option value="v/v1.17.0/doc/index.html">v1.17.0</option>
					<option value="v/v1.16.0/doc/index.html">v1.16.0</option>
					<option value="v/v1.15.0/doc/index.html">v1.15.0</option>
					<option value="v/v1.14.0/doc/index.html">v1.14.0</option>
					<option value="v/v1.13.0/doc/index.html">v1.13.0</option>
					<option value="v/v1.12.1/doc/index.html">v1.12.1</option>
					<option value="v/v1.12.0/doc/index.html">v1.12.0</option>
					<option value="v/v1.11.0/doc/index.html">v1.11.0</option>
					<option value="v/v1.10.0/doc/index.html">v1.10.0</option>
					<option value="v/v1.9.0/doc/index.html">v1.9.0</option>
					<option value="v/v1.8.0/doc/index.html">v1.8.0</option>
					<option value="v/v1.7.0/doc/index.html">v1.7.0</option>
					<option value="v/v1.6.0/doc/index.html">v1.6.0</option>
					<option value="v/v1.5.1/doc/index.html">v1.5.1</option>
					<option value="v/v1.4.0/doc/index.html">v1.4.0</option>
					<option value="v/v1.3.0/doc/index.html">v1.3.0</option>
					<option value="v/v1.2.0/doc/index.html">v1.2.0</option>
					<option value="v/v1.1.0/doc/index.html">v1.1.0</option>
					<option value="v/v1.0.0/doc/index.html">v1.0.0</option>
					<option value="/">首页</option>
				</select>
				<div class="zk-box p-none">
					<a class="wzi" href="javascript:;">
						<!-- <span>背景 </span> -->
						<img class="theme-btn" src="static/icon/theme.svg">
						<!-- <span class="zk-icon"></span> -->
					</a>
					<div class="zk-context theme-box">
						<div>
							<div style="height: 5px;"></div>
							<span style="background-color: #FFFFFF;"></span>
							<span style="background-color: #f5f5f5;"></span>
							<span style="background-color: #F1FAFA;"></span>
							<span style="background-color: #f5f5d5;"></span>
							<span style="background-color: #d5f5f5;"></span>
							
							<span style="background-color: #f5e5f5;"></span>
							<span style="background-color: #E8E8FF;"></span>
							<span style="background-color: #f0f9eb;"></span>
							<span style="background-color: #ebe5dd;"></span>
							<span style="background-color: #e8f4ff;"></span>
							
							<!-- <span style="background-color: #F0DAD2;"></span> -->
							<!-- <span style="background-color: #f5d5d5;"></span> -->
							<!-- <span style="background-color: #FFFFE0;"></span> -->
							<!-- <span style="background-color: #eeeeee;"></span> -->
							<!-- <span style="background-color: #f5fafe;"></span> -->
						</div>
					</div>
				</div>
				<a class="wzi" href="index.html">首页</a>
				<a class="wzi" href="doc.html">文档</a>
				<a class="p-none wzi" href="#/more/link">案例</a>
				<a class="p-none wzi" href="#/more/demand-commit">需求提交</a>
				<!-- <a class="p-none wzi" href="#/more/blog">博客</a> -->
				<a class="p-none wzi" href="#/more/sa-token-donate">赞助</a>
				<a class="p-none wzi" href="#/sso/sso-pro">🔥 SSO商业版</a>
				<div class="zk-box">
					<a class="wzi" href="javascript:;">
						<span>相关资源 </span>
						<span class="zk-icon"></span>
					</a>
					<div class="zk-context">
						<div>
							<!-- <a href="#/more/sa-token-donate">❤️ &nbsp;赞助</a> -->
							<a href="#/more/update-log">更新日志</a>
							<a href="#/more/common-questions">常见报错</a>
							<a href="#/more/tj-gzh">推荐公众号</a>
							<a href="#/more/blog">相关博客</a>
							<div class="zk-fengexian"></div>
							<!-- <a href="http://sa-app.dev33.cn/wall.html?name=sa-token" target="_blank">需求墙</a> -->
							<a href="#/fun/sa-token-test">在线考试</a>
							<a href="#/fun/issue-template">在线提问</a>
							<!-- <a href="https://wj.qq.com/s2/10852322/0d8b/" target="_blank">需求提交</a> -->
							<a href="https://wj.qq.com/s2/8475114/2f6a/" target="_blank">问卷调查</a>
						</div>
					</div>
				</div>
			</nav>
		</div>
		<!-- <a href="/">
			<div class="logo-box">
				<img src="logo.png" title="logo" />
				<h1 class="logo-text">Sa-Token</h1>
			</div>
		</a> -->
		
		<div class="main-box">
			<div id="app">加载中...</div>
		</div>
		<div style="position: fixed; right: 0; bottom: 0; z-index: 10000; border: 0px #aaa solid;">
			<div class="wwads-cn wwads-vertical" data-id="88" style="max-width:150px"></div>
		</div>
		
		<!-- UI逐渐显现 -->
		<style type="text/css">
			body{opacity: 0.01; transition: opacity 0.5s; background-color: #FFF;}
		</style>
		<script type="text/javascript">
			setTimeout(function() {
				document.body.style.opacity = 1;
			}, 1);
		</script>
		
		<!--  -->
		<script src="./static/docsify-plugin.js"></script>
		<script>
			var saTokenTopVersion = '1.34.0';	// Sa-Token最新版本 
			var name = '<img style="width: 60px; height: 60px; vertical-align: middle;" src="logo.png" alt="logo" /> ';
			name += '<b style="font-size: 28px; vertical-align: middle;">Sa-Token</b> <sub>v' + saTokenTopVersion + '</sub>';
			window.$docsify = {
				// name: name, // 名字 
				repo: 'https://github.com/dromara/sa-token', // github地址 
				// themeColor: '#06A3D7', // 主题颜色  
				basePath: location.pathname.substr(0, location.pathname.lastIndexOf('/') + 1), // 自动计算项目名字 
				// basePath: '/sa-token-doc/',		// 设置文件加载的父路径, 这在一些带项目名部署的文件中非常有效
				auto2top: true, // 是否在切换页面后回到顶部 
				// coverpage: true, // 开启封面 
				subMaxLevel: 4, // 标题解析层级, 写几就在目录树中解析到几级标题 ,一般写2吧也就 
				loadSidebar: true, // 加载自定义侧边栏 , 目录定制在: _sidebar.md 文件 (需要创建 .nojekyll 的空文件，阻止 GitHub Pages 忽略命名是下划线开头的文件)
				copyCode: { // 复制插件 
					buttonText: '复制到剪贴板',
					errorText: '错误',
					successText: '复制成功'
				},
				topMargin: 90, // 锚点距离顶部的距离 
				// sidebarDisplayLevel : 1 ,  // 设置侧边栏显示级别
				// search: 'auto', // 搜索功能 
				alias: {
					// '/sso/_sidebar.md': '/sso/_sidebar.md',
					'/.*/_sidebar.md': '/_sidebar.md'
				},
				// tab选项卡
				tabs: {
					persist    : true,      // 是否在刷新页面时重置选项卡
					sync       : true,      // 页面上的多个tab是否同步切换
					theme      : 'classic', // 主题：'classic', 'material', false
					tabComments: true,      // 用注释来标注选项卡标题，例如：<!-- tab:SpringBoot  -->
					tabHeadings: true       // 用标题+粗体来定制选项卡
				},
				// 自定义插件 
				plugins: [myDocsifyPlugin],
			}
		</script>
		<script src="static/docsify.min.js"></script>
		<script src="static/docsify-copy-code.min.js"></script>
		
		<!-- 语言合集：https://cdn.jsdelivr.net/npm/prismjs@1/components/ -->
		<script src="static/prism/prism-java.min.js"></script>
		<script src="static/prism/prism-gradle.min.js"></script>
		<script src="static/prism/prism-yaml.min.js"></script>
		<script src="static/prism/prism-properties.min.js"></script>
		
		<!-- 搜索框 -->
		<script src="static/search.min.js"></script>
		<!-- 多 tab 切换 -->
		<script src="static/docsify-tabs.min.js"></script>
		<!-- img点击放大 -->
		<script src="static/zoom-image.min.js"></script>

		<!-- sidebar折叠 -->
		<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" />
		<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script> -->

		<!-- jqeury -->
		<script src="static/jquery.min.js"></script>
		<script src="static/layer-v3.1.1/layer.js"></script>
		
		<script>
			if(window.jQuery === undefined || window.Docsify === undefined) {
				var str = 'CDN 加载失败，请打开备用地址：<a href="index-backup.html' + location.hash + '" target="_blank">index-backup.html</a>';
				document.querySelector('#app').innerHTML = str;
			}
		</script>

		<!-- 搜索引擎自动提交 -->
		<script>
			(function() {
				var bp = document.createElement('script');
				var curProtocol = window.location.protocol.split(':')[0];
				if (curProtocol === 'https') {
					bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
				} else {
					bp.src = 'http://push.zhanzhang.baidu.com/push.js';
				}
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(bp, s);
			})();
		</script>
		
		<script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
		
		<!-- 友盟 -->
		<div style="height: 0px; overflow: hidden;">
			<script type="text/javascript" src="https://s4.cnzz.com/z_stat.php?id=1279646043&web_id=1279646043"></script>
		</div>
		<!-- 百度统计 -->
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?35ad501304eae758ac6139a22a9830f5";
				var s = document.getElementsByTagName("script")[0]; 
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
		
		<script type="text/javascript">
			// 预览版提示 
			if(location.host === 'rc.sa-token.cc') {
				const newTips = '<b>当前文档为RC预览版文档，仅做学习测试使用，正式项目请使用正式版：<a href="https://sa-token.cc/" target="_blank">https://sa-token.cc/</a></b>';
				layer.alert(newTips);
			}
		</script>
		
		<!-- 修改背景颜色 -->
		<script>
			
			// 绑定修改背景色的按钮事件
			$('.theme-box span').click(function() {
				let bgColor = this.style.backgroundColor;
				setBg(bgColor);
				localStorage.setItem('bg-color-value', bgColor)
			})
			// 读取上次记录
			let bgColor = localStorage.getItem('bg-color-value');
			if(bgColor) {
				setBg(bgColor);
			}
			
			// 设置背景颜色 
			function setBg(bgColor) {
				console.log('---- 背景颜色设定为：', bgColor);
				
				// -------- 设置 body 背景
				document.body.style.backgroundColor = bgColor;
				
				// -------- 设置 header 头背景
				// 如果是 16 进制，转 rgba
				if(bgColor.indexOf('#') == 0) {
					bgColor = hexToRgba(bgColor, 0.97);
				}
				// 如果是 rgb，转 rgba
				else if(bgColor.match(/\,/g).length == 2) {
					bgColor = bgColor.replace(')', ' ,0.97)');
				}
				
				document.querySelector('.doc-header').style.backgroundColor = bgColor;
			}
			
			// 16进制 转 rgba
			function hexToRgba(str, a){
				a = a || 1;

				var reg = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/
				if(!reg.test(str)){return;}
				let newStr = (str.toLowerCase()).replace(/\#/g,'')
				let len = newStr.length;
				if(len == 3){
					let t = ''
					for(var i=0;i<len;i++){
						t += newStr.slice(i,i+1).concat(newStr.slice(i,i+1))
					}
					newStr = t
				}
				let arr = []; //将字符串分隔，两个两个的分隔
				for(var i =0;i<6;i=i+2){
					let s = newStr.slice(i,i+2)
					arr.push(parseInt("0x" + s))
				}
				return 'rgb(' + arr.join(",")  + ', ' + a + ')';
			}
			
		</script>
	</body>
</html>
